#include<iostream>
#include<string.h>
#include<ctype.h>
#include<algorithm>
using namespace std;
int main(){
  char password[50];
  cin>>password;
  int len=strlen(password);
  reverse(password,password+len);
  for(int i=0;i<len;i++){
    if(isupper(password[i])){
      password[i]=(password[i]-65+3)%26+65;
      password[i]=tolower(password[i]);
    }else{
      password[i]=(password[i]-97+3)%26+97;
      password[i]=toupper(password[i]);
    }
  }
  cout<<password;
}